#include "hollowFeature.h"

HollowFeature::HollowFeature()
{
    //初始值都设置成-1
    featureType = 11;
    hollowId = -1;
    resultId = -1;
    targetFeature = nullptr;
}

HollowFeature::~HollowFeature()
{
}

int HollowFeature::getHollowId()
{
    return this->hollowId;
}

double HollowFeature::getHollowD()
{
    return this->d;
}

double HollowFeature::getHollowTolerance()
{
    return this->tolerance;
}

int HollowFeature::getResultId()
{
    return this->resultId;
}

BaseFeature* HollowFeature::getTargetFeature()
{
    return this->targetFeature;
}

std::list<int> HollowFeature::getSubFaceIndexs()
{
    return this->subFaceIndexs;
}

int HollowFeature::getSubShapeIndexByIndex(int index)
{
    //从list中获取第index个元素
    std::list<int>::iterator it = this->subFaceIndexs.begin();
    //advance 将iterator移动n个位置
    std::advance(it, index);
    return *it;
}

void HollowFeature::setHollowId(int hollowId)
{
    this->hollowId = hollowId;
}

void HollowFeature::setHollowD(double d)
{
    this->d = d;
}

void HollowFeature::setHollowTolerance(double tolerance)
{
    this->tolerance = tolerance;
}

void HollowFeature::setResultId(int resultId)
{
    this->resultId = resultId;
}

void HollowFeature::setTargetFeature(BaseFeature* targetFeature)
{
    this->targetFeature = targetFeature;
}

void HollowFeature::addSubShapeIndex(int index)
{
    this->subFaceIndexs.push_back(index);
}
